package com.example.demo;

import org.springframework.util.CollectionUtils;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Objects;

/**
 * @author yishuangshuang
 * @ClassName: CollectionUtilDemo
 * @Description: TODO
 * @date 2019/1/18 11:21 AM
 */
public class CollectionUtilDemo {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        list.add("111");
        list.add("1112");
        list.add("1113");
        list.add("1114");
        list.add("1115");
        if (!CollectionUtils.isEmpty(list)) {
            System.out.println(list);
        }

        List<String> l1 = null;
        if (!CollectionUtils.isEmpty(l1)) {
            System.out.println(l1);
        } else {
            System.out.println("kongkongkong");
        }
        ;
        System.out.println(Collections.max(list));
        Objects.nonNull(list);
        String m = null;
        Objects.requireNonNull(m, "你咋空呢？");

    }

    public static List get(){
        return Collections.EMPTY_LIST;
    }
}
